import request from '@/utils/request'

/**
 * 获取预授权码
 * @params {state,authType}
 */
export async function getPreAuthUrl(params: any) {
  return request({
    url: '/getpreauthurl',
    method: 'get',
    params,
  })
}

/**
 * 根据返回授权码设置授权码
 */
export async function setAuthCode(params: any) {
  return request({
    url: '/setauthcode',
    method: 'get',
    params,
  })
}
